@extends('admin.layout.layout')
 @section('title')
 <title>阴阳师后台</title>
 @endsection
 @section('con')
 <div class="row"> 
     <div class="col-lg-12"> 
      <h1 class="page-header">用户添加
      </h1> 
     </div> 
     <!-- /.col-lg-12 --> 
    </div> 
    <!-- /.row --> 
   <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            阴阳师添加用户
                        </div>
                        <div class="panel-body">
                            <div class="row"> 
                             @if (count($errors) > 0)
                                     <div class="alert alert-danger">
                                          <ul>
                                         @foreach ($errors->all() as $error)
                                         <li>{{ $error }}</li>
                                          @endforeach
                                         </ul>
                                     </div>
                                @endif
                                <div class="col-lg-6 col-lg-offset-3">
                               
                                    <form role="form" action="/admin/user/insert" method="post" enctype="multipart/form-data">
                                        <div class="form-group">
                                            <label>用户名</label>
                                            <input class="form-control" name="username" value="{{old('username')}}">
                                            <p class="help-block">请输入6-18位的用户名</p>
                                        </div>
                                        <div class="form-group">
                                            <label>密码</label>
                                            <input class="form-control" name="password" type="password" value="{{old('password')}}">
                                            <p class="help-block">请设置6-10位的密码</p>
                                        </div>
                                        <div class="form-group">
                                            <label>手机号</label>
                                            <input class="form-control" name="phone" type="text" value="{{old('phone')}}">
                                            <p class="help-block">请输入11位的手机号</p>
                                        </div>
                                         <div class="form-group">
                                            <label>邮箱</label>
                                            <input class="form-control" name="email" type="email" value="{{old('email')}}">
                                            <p class="help-block">请输入邮箱号</p>
                                        </div>
                                        
                                        <div class="form-group">

                                            <label>用户权限</label>
                                            <select class="form-control" name="auth" value="{{old('auth')}}">
                                                <option value="1">普通用户</option>
                                                <option value="2">管理员</option>
                                            </select>
                                        </div>
                                            <div class="form-group">
                                            <label>选择头像</label>
                                            <input type="file" name="pic">
                                        </div>
                                        
                                       {{csrf_field()}}
                                        <button type="submit" class="btn btn-danger">添加</button>
                                        <button type="reset" class="btn btn-primary">重置</button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                               
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
 @endsection
 
